#import <Foundation/Foundation.h>


@class ReplaceAnimation;

@protocol ReplaceAnimationDelegate<NSObject>
@optional
- (void)replaceAnimationDidStop:(ReplaceAnimation *)anim;
@end



@interface ReplaceAnimation : NSObject
{
	id<ReplaceAnimationDelegate>	m_delegate;
	CFTimeInterval					m_duration;
}
@property(nonatomic, assign) id<ReplaceAnimationDelegate>	delegate;
@property(nonatomic		   ) CFTimeInterval					duration;

+ (ReplaceAnimation*)NullAnimation;


- (void)setAnimation:(UIView*)view;


- (void)finishAnimation;
@end


#pragma mark -
@interface ReplaceNullAnimation : ReplaceAnimation
@end


#pragma mark -

@interface ReplaceCATransitionAnimation : ReplaceAnimation
{
	NSString* m_type;
	NSString* m_subtype;
}
- (id)initWithType:(NSString*)type subtype:(NSString*)subtype;
@end

@interface ReplaceAnimation(ReplaceCATransitionAnimation)
+ (ReplaceAnimation*)CAAnimation:(NSString*)type subtype:(NSString*)subtype;
+ (ReplaceAnimation*)CAPushAnimation:subtype;
@end


#pragma mark -

@interface ReplaceUIViewAnimation : ReplaceAnimation
{
	UIViewAnimationTransition	m_type;
}
@end

@interface ReplaceAnimation(ReplaceUIViewAnimation)
+ (ReplaceAnimation*)UIViewAnimation:(UIViewAnimationTransition)type;
@end
